home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / Buch / Huepf1.cpp < prev    next >
C/C++ Source or Header  |  1998-12-28  |  896b  |  25 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "Huepf1.h"
  6. //---------------------------------------------------------------------------
  7. #pragma resource "*.dfm"
  8. TForm1 *Form1;
  9. //---------------------------------------------------------------------------
  10. __fastcall TForm1::TForm1(TComponent* Owner)
  11.     : TForm(Owner)
  12. {
  13. }
  14. //---------------------------------------------------------------------------
  15. void __fastcall TForm1::Button1Click(TObject *Sender)
  16. {
  17.   Button1->Left = random (ClientWidth-Button1->Width);
  18.   Button1->Top  = random (ClientHeight-Button1->Height);
  19. }
  20. //---------------------------------------------------------------------------
  21. void __fastcall TForm1::FormCreate(TObject *Sender)
  22. {
  23.   randomize ();
  24. }
  25. //---------------------------------------------------------------------------